package com.gitee.fsadmin.common.util;

import lombok.extern.slf4j.Slf4j;
import org.apache.commons.codec.digest.DigestUtils;

import java.nio.charset.StandardCharsets;

/**
 * @author 六如
 */
@Slf4j
public class GenerateUtil {

    public static String getUserPassword(String username, String password, String salt) {
        return DigestUtils.md5Hex((username + password + salt).getBytes(StandardCharsets.UTF_8));
    }

    public static String getUUID() {
        return IdGen.uuid();
    }

}
